package com.cobo.fitness.web.post.routes;

import com.cobo.common.core.R;
import com.cobo.fitness.core.entrypoint.HttpApi;
import com.cobo.fitness.web.post.entity.Category;
import com.cobo.fitness.web.post.entity.Post;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Map;

@RestController
@RequestMapping("/category")
public class CategoryRouter {



    @GetMapping("/**")
    public R<?> handler(HttpServletRequest request,
                     HttpServletResponse response,
                     @RequestBody(required = false) Map<String,Object> params) {
        return HttpApi.handler(Category.class, params, request, response);
    }
}
